#pragma once

#include <stdio.h>
#include <iostream>
#include <string>
#include <sstream>
#include <fstream>
#include "ModelManager.h"
#include "PowerUps.h"
#include "MiniGame.h"
#include "VirusEnemy.h"
#include "d3d9.h"
#include "d3dx9.h"
#include "ObstacleManager.h"
#include "Camera.h"

#pragma comment (lib, "d3d9.lib")
#pragma comment (lib, "d3dx9.lib")

using namespace std;

class LevelManager
{
private:
	// Singleton instance
	static LevelManager*	m_LevelInstance;
	/////////////////////////////////////
	// Instances
	ModelManager*	m_pModelMan;
	PowerUps*		m_PowerUps;
	MiniGame*		m_pMiniGame;
	VirusEnemy*		m_pVirusEn;
	ObstacleManager*	m_pObstacleMan;
	Camera*				m_pCamera;
	/////////////////////////////////////
	// Variables received from text file
	char	cObject[20];
	char	cFilename[20];
	float	fFirstIn;
	float	fSecondIn;
	float	fThirdIn;
	bool	fFourthIn;
	float	fFifthIn;
	// All preloaded models in text file
	short	sPreModels;
	short	sPrePowerUps;
	short	sMiniGame1;
	short	sMiniGame2;
	short	sMiniGame3;
	short	sPreTeslaCoil;
	short	sPrePiston;
	short	sPreAcidPit;
	short	sPreFirewall;
	// Variable to track how many mini-games in the level
	// once all games completed then exit becomes available.
	short   sMiniGameCount;

public:
	LevelManager(void);
	~LevelManager(void);

	// Singleton Functions
	static LevelManager* GetInstance(void);
	void DeleteLevelInstance(void);
	// Level Manager
	void Initialize(void);
	void LoadLevel(int iLevel);
	short GetPreModels(void);
	short GetPowerUps(void);
	short GetMiniGameID1(void);
	short GetMiniGameID2(void);
	short GetMiniGameID3(void);
	short GetPreTeslaCoil(void);
	short GetPrePiston(void);
	short GetPreAcidPit(void);
	short GetPreFirewall(void);
	short GetMiniGameCount(void);
};
